package cn.iocoder.yudao.module.system.dal.mysql.companyjob;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.system.dal.dataobject.companyjob.CompanyJobDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.system.controller.admin.companyjob.vo.*;

/**
 * 公司职位 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface CompanyJobMapper extends BaseMapperX<CompanyJobDO> {

    default PageResult<CompanyJobDO> selectPage(CompanyJobPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<CompanyJobDO>()
                .betweenIfPresent(CompanyJobDO::getCreateTime, reqVO.getCreateTime())
                .eqIfPresent(CompanyJobDO::getCompanyId, reqVO.getCompanyId())
                .likeIfPresent(CompanyJobDO::getJobName, reqVO.getJobName())
                .eqIfPresent(CompanyJobDO::getPoints, reqVO.getPoints())
                .orderByDesc(CompanyJobDO::getId));
    }

}